//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;

public class PhoneRecycleApp extends JFrame {
    private CardLayout cardLayout;
    private JPanel cardPanel;
    private static final String HOME_PAGE = "home";
    private static final String VALUATION_PAGE = "valuation";
    private static final String CONFIRMATION_PAGE = "confirmation";
    private static final String SUCCESS_PAGE = "success";

    public PhoneRecycleApp() {
        this.setTitle("二易集 - 手机回收平台");
        this.setSize(400, 700);
        this.setDefaultCloseOperation(3);
        this.setLocationRelativeTo((Component)null);
        this.setResizable(false);
        this.cardLayout = new CardLayout();
        this.cardPanel = new JPanel(this.cardLayout);
        this.cardPanel.add(this.createHomePage(), "home");
        this.cardPanel.add(this.createValuationPage(), "valuation");
        this.cardPanel.add(this.createConfirmationPage(), "confirmation");
        this.cardPanel.add(this.createSuccessPage(), "success");
        this.add(this.cardPanel);
        this.cardLayout.show(this.cardPanel, "home");
    }

    private JPanel createHomePage() {
        JPanel homePanel = new JPanel(new BorderLayout());
        homePanel.setBackground(new Color(245, 245, 245));
        JPanel header = new JPanel(new BorderLayout());
        header.setBackground(new Color(255, 69, 0));
        header.setPreferredSize(new Dimension(400, 50));
        JLabel locationLabel = new JLabel(" 沈阳");
        locationLabel.setFont(new Font("Microsoft YaHei", 1, 12));
        locationLabel.setForeground(Color.WHITE);
        header.add(locationLabel, "West");
        JPanel searchPanel = new JPanel(new BorderLayout());
        searchPanel.setBackground(Color.WHITE);
        searchPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
        JLabel searchLabel = new JLabel("\ud83d\udd0d 搜索商品");
        searchLabel.setFont(new Font("Microsoft YaHei", 0, 10));
        searchLabel.setForeground(new Color(153, 153, 153));
        searchPanel.add(searchLabel, "West");
        header.add(searchPanel, "Center");
        JLabel messageLabel = new JLabel("✉");
        messageLabel.setFont(new Font("Arial", 0, 14));
        messageLabel.setForeground(Color.WHITE);
        header.add(messageLabel, "East");
        homePanel.add(header, "North");
        JPanel promoHeader = new JPanel(new FlowLayout(0));
        promoHeader.setBackground(new Color(255, 109, 0));
        promoHeader.setPreferredSize(new Dimension(400, 40));
        JLabel promoLabel = new JLabel("限时力");
        promoLabel.setFont(new Font("Microsoft YaHei", 1, 12));
        promoLabel.setForeground(Color.WHITE);
        promoHeader.add(promoLabel);
        homePanel.add(promoHeader, "Center");
        JPanel contentPanel = new JPanel();
        contentPanel.setLayout(new BoxLayout(contentPanel, 1));
        contentPanel.setBackground(new Color(245, 245, 245));
        contentPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        JPanel categoryPanel = this.createCardPanel("手机数码");
        JPanel categoriesPanel = new JPanel(new FlowLayout(0, 10, 5));
        categoriesPanel.setBackground(Color.WHITE);
        String[] categories = new String[]{"手机", "电脑", "耳机", "手表"};

        for(String category : categories) {
            JLabel catLabel = new JLabel(category);
            catLabel.setFont(new Font("Microsoft YaHei", 0, 12));
            categoriesPanel.add(catLabel);
        }

        categoryPanel.add(categoriesPanel);
        contentPanel.add(categoryPanel);
        contentPanel.add(Box.createVerticalStrut(10));
        JPanel newUserPanel = this.createCardPanel("新用户专享");
        newUserPanel.setBackground(new Color(255, 243, 224));
        JLabel discountLabel = new JLabel("限时加价18%");
        discountLabel.setFont(new Font("Microsoft YaHei", 0, 12));
        discountLabel.setForeground(new Color(255, 109, 0));
        discountLabel.setAlignmentX(0.0F);
        newUserPanel.add(discountLabel);
        JPanel devicePanel = new JPanel();
        devicePanel.setLayout(new BoxLayout(devicePanel, 0));
        devicePanel.setBackground(new Color(255, 243, 224));
        devicePanel.setAlignmentX(0.0F);
        JLabel deviceLabel = new JLabel("vivo IQOO 11 Pro | 更换");
        deviceLabel.setFont(new Font("Microsoft YaHei", 0, 12));
        JLabel priceLabel = new JLabel("预估￥1519");
        priceLabel.setFont(new Font("Microsoft YaHei", 1, 14));
        priceLabel.setForeground(new Color(255, 69, 0));
        devicePanel.add(deviceLabel);
        devicePanel.add(Box.createHorizontalGlue());
        devicePanel.add(priceLabel);
        newUserPanel.add(devicePanel);
        JButton changeButton = new JButton("立即换钱");
        changeButton.setFont(new Font("Microsoft YaHei", 1, 14));
        changeButton.setBackground(new Color(255, 69, 0));
        changeButton.setForeground(Color.WHITE);
        changeButton.setBorderPainted(false);
        changeButton.setFocusPainted(false);
        changeButton.setAlignmentX(0.0F);
        changeButton.addActionListener((e) -> this.cardLayout.show(this.cardPanel, "valuation"));
        newUserPanel.add(Box.createVerticalStrut(10));
        newUserPanel.add(changeButton);
        contentPanel.add(newUserPanel);
        contentPanel.add(Box.createVerticalStrut(10));
        JPanel recyclePanel = this.createCardPanel("3招帮你卖 怎么都省心");
        String[] methods = new String[]{"门店回收", "上门回收", "邮寄回收"};

        for(String method : methods) {
            JLabel methodLabel = new JLabel("• " + method);
            methodLabel.setFont(new Font("Microsoft YaHei", 0, 12));
            methodLabel.setAlignmentX(0.0F);
            recyclePanel.add(methodLabel);
        }

        contentPanel.add(recyclePanel);
        JScrollPane scrollPane = new JScrollPane(contentPanel);
        scrollPane.setBorder(BorderFactory.createEmptyBorder());
        homePanel.add(scrollPane, "Center");
        JPanel navbarPanel = new JPanel(new GridLayout(1, 5));
        navbarPanel.setBackground(Color.WHITE);
        navbarPanel.setPreferredSize(new Dimension(400, 50));
        String[] navItems = new String[]{"首页", "领券", "换钱", "回收车", "我的"};
        String[] navIcons = new String[]{"\ud83c\udfe0", "\ud83c\udfab", "\ud83d\udcb0", "\ud83d\uded2", "\ud83d\udc64"};

        for(int i = 0; i < navItems.length; ++i) {
            JPanel navPanel = new JPanel();
            navPanel.setLayout(new BoxLayout(navPanel, 1));
            navPanel.setBackground(Color.WHITE);
            JLabel iconLabel = new JLabel(navIcons[i], 0);
            iconLabel.setFont(new Font("Arial", 0, 16));
            iconLabel.setAlignmentX(0.5F);
            JLabel textLabel = new JLabel(navItems[i], 0);
            textLabel.setFont(new Font("Microsoft YaHei", 0, 9));
            textLabel.setAlignmentX(0.5F);
            navPanel.add(iconLabel);
            navPanel.add(textLabel);
            if (i == 0) {
                JLabel dotLabel = new JLabel("•", 0);
                dotLabel.setFont(new Font("Arial", 0, 16));
                dotLabel.setForeground(new Color(255, 69, 0));
                dotLabel.setAlignmentX(0.5F);
                navPanel.add(dotLabel);
            }

            navbarPanel.add(navPanel);
        }

        homePanel.add(navbarPanel, "South");
        return homePanel;
    }

    private JPanel createValuationPage() {
        JPanel valuationPanel = new JPanel(new BorderLayout());
        valuationPanel.setBackground(new Color(245, 245, 245));
        JPanel header = this.createHeader("估价结果", "home");
        valuationPanel.add(header, "North");
        JPanel contentPanel = new JPanel();
        contentPanel.setLayout(new BoxLayout(contentPanel, 1));
        contentPanel.setBackground(new Color(245, 245, 245));
        contentPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        JPanel deviceCard = this.createCardPanel((String)null);
        JLabel deviceLabel = new JLabel("vivo IQOO 11Pro 16GB+512G");
        deviceLabel.setFont(new Font("Microsoft YaHei", 0, 14));
        deviceLabel.setAlignmentX(0.0F);
        deviceCard.add(deviceLabel);
        JPanel pricePanel = new JPanel();
        pricePanel.setLayout(new BoxLayout(pricePanel, 0));
        pricePanel.setBackground(Color.WHITE);
        pricePanel.setAlignmentX(0.0F);
        JLabel priceLabel = new JLabel("￥1519");
        priceLabel.setFont(new Font("Microsoft YaHei", 1, 24));
        priceLabel.setForeground(new Color(255, 69, 0));
        JPanel timePanel = new JPanel();
        timePanel.setLayout(new BoxLayout(timePanel, 1));
        timePanel.setBackground(Color.WHITE);
        JLabel timeText = new JLabel("距加价结束");
        timeText.setFont(new Font("Microsoft YaHei", 0, 9));
        timeText.setForeground(new Color(153, 153, 153));
        JLabel timeValue = new JLabel("23:57:24");
        timeValue.setFont(new Font("Microsoft YaHei", 1, 12));
        timeValue.setForeground(new Color(255, 69, 0));
        timePanel.add(timeText);
        timePanel.add(timeValue);
        pricePanel.add(priceLabel);
        pricePanel.add(Box.createHorizontalGlue());
        pricePanel.add(timePanel);
        deviceCard.add(pricePanel);
        JPanel detailPanel = new JPanel(new FlowLayout(0));
        detailPanel.setBackground(new Color(249, 249, 249));
        detailPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        detailPanel.setAlignmentX(0.0F);
        JLabel detailLabel = new JLabel("商品估价 ¥1287 + 新用户回收券 ¥232");
        detailLabel.setFont(new Font("Microsoft YaHei", 0, 10));
        detailPanel.add(detailLabel);
        deviceCard.add(detailPanel);
        JPanel optionPanel = new JPanel(new FlowLayout(0));
        optionPanel.setBackground(Color.WHITE);
        optionPanel.setAlignmentX(0.0F);
        JLabel optionText = new JLabel("您的选项：");
        optionText.setFont(new Font("Microsoft YaHei", 0, 10));
        JLabel optionValue = new JLabel("外壳有细微使用痕迹【较少使用】");
        optionValue.setFont(new Font("Microsoft YaHei", 0, 10));
        optionValue.setForeground(new Color(255, 69, 0));
        optionPanel.add(optionText);
        optionPanel.add(optionValue);
        deviceCard.add(optionPanel);
        contentPanel.add(deviceCard);
        contentPanel.add(Box.createVerticalStrut(10));
        String[][] options = new String[][]{{"若屏幕有细微划痕", "¥1394~1469"}, {"若外壳有明显脱胶", "¥1342~1432"}, {"若设备有进水情况", "¥13"}};

        for(String[] option : options) {
            JPanel optPanel = new JPanel();
            optPanel.setLayout(new BoxLayout(optPanel, 0));
            optPanel.setBackground(Color.WHITE);
            optPanel.setAlignmentX(0.0F);
            optPanel.setBorder(BorderFactory.createEmptyBorder(5, 20, 5, 20));
            JLabel optLabel = new JLabel(option[0]);
            optLabel.setFont(new Font("Microsoft YaHei", 0, 10));
            JLabel priceOpt = new JLabel(option[1]);
            priceOpt.setFont(new Font("Microsoft YaHei", 1, 10));
            priceOpt.setForeground(new Color(255, 69, 0));
            optPanel.add(optLabel);
            optPanel.add(Box.createHorizontalGlue());
            optPanel.add(priceOpt);
            contentPanel.add(optPanel);
        }

        contentPanel.add(Box.createVerticalStrut(10));
        JLabel methodTitle = new JLabel("选择回收方式");
        methodTitle.setFont(new Font("Microsoft YaHei", 1, 12));
        methodTitle.setAlignmentX(0.0F);
        contentPanel.add(methodTitle);
        Object[][] methods = new Object[][]{{"门店回收", "立即拿钱", "\ud83c\udfe2", new Color(76, 175, 80)}, {"上门回收", "免费上门", "\ud83d\ude97", new Color(33, 150, 243)}, {"邮寄回收", "顺丰取件", "\ud83d\udce6", new Color(255, 152, 0)}};

        for(Object[] method : methods) {
            JPanel methodCard = this.createCardPanel((String)null);
            methodCard.setLayout(new BoxLayout(methodCard, 0));
            JPanel iconPanel = new JPanel();
            iconPanel.setPreferredSize(new Dimension(40, 40));
            iconPanel.setBackground((Color)method[3]);
            iconPanel.setLayout(new BorderLayout());
            JLabel iconLabel = new JLabel((String)method[2], 0);
            iconLabel.setFont(new Font("Arial", 0, 18));
            iconLabel.setForeground(Color.WHITE);
            iconPanel.add(iconLabel, "Center");
            methodCard.add(iconPanel);
            methodCard.add(Box.createHorizontalStrut(10));
            JPanel textPanel = new JPanel();
            textPanel.setLayout(new BoxLayout(textPanel, 1));
            textPanel.setBackground(Color.WHITE);
            JLabel titleLabel = new JLabel((String)method[0]);
            titleLabel.setFont(new Font("Microsoft YaHei", 1, 12));
            JLabel descLabel = new JLabel((String)method[1]);
            descLabel.setFont(new Font("Microsoft YaHei", 0, 10));
            descLabel.setForeground(new Color(102, 102, 102));
            textPanel.add(titleLabel);
            textPanel.add(descLabel);
            methodCard.add(textPanel);
            methodCard.add(Box.createHorizontalGlue());
            JLabel selectLabel = new JLabel("○");
            selectLabel.setFont(new Font("Arial", 0, 18));
            selectLabel.setForeground(new Color(204, 204, 204));
            methodCard.add(selectLabel);
            contentPanel.add(methodCard);
            contentPanel.add(Box.createVerticalStrut(5));
        }

        JPanel addressCard = this.createCardPanel("回收地址");
        JLabel addressLabel = new JLabel("沈阳航空航天大学南生活区");
        addressLabel.setFont(new Font("Microsoft YaHei", 0, 12));
        addressLabel.setAlignmentX(0.0F);
        JLabel phoneLabel = new JLabel("191****6666");
        phoneLabel.setFont(new Font("Microsoft YaHei", 0, 10));
        phoneLabel.setForeground(new Color(102, 102, 102));
        phoneLabel.setAlignmentX(0.0F);
        addressCard.add(addressLabel);
        addressCard.add(phoneLabel);
        contentPanel.add(addressCard);
        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, 0));
        buttonPanel.setBackground(new Color(245, 245, 245));
        buttonPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));
        JButton backButton = new JButton("返回");
        backButton.setFont(new Font("Microsoft YaHei", 0, 12));
        backButton.setBackground(new Color(224, 224, 224));
        backButton.addActionListener((e) -> this.cardLayout.show(this.cardPanel, "home"));
        JButton submitButton = new JButton("提交换钱");
        submitButton.setFont(new Font("Microsoft YaHei", 0, 12));
        submitButton.setBackground(new Color(255, 69, 0));
        submitButton.setForeground(Color.WHITE);
        submitButton.addActionListener((e) -> this.cardLayout.show(this.cardPanel, "confirmation"));
        buttonPanel.add(backButton);
        buttonPanel.add(Box.createHorizontalGlue());
        buttonPanel.add(submitButton);
        JScrollPane scrollPane = new JScrollPane(contentPanel);
        scrollPane.setBorder(BorderFactory.createEmptyBorder());
        valuationPanel.add(scrollPane, "Center");
        valuationPanel.add(buttonPanel, "South");
        return valuationPanel;
    }

    private JPanel createConfirmationPage() {
        JPanel confirmationPanel = new JPanel(new BorderLayout());
        confirmationPanel.setBackground(new Color(245, 245, 245));
        JPanel header = this.createHeader("确认信息", "valuation");
        confirmationPanel.add(header, "North");
        JPanel contentPanel = new JPanel();
        contentPanel.setLayout(new BoxLayout(contentPanel, 1));
        contentPanel.setBackground(new Color(245, 245, 245));
        contentPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        JPanel deviceCard = this.createCardPanel((String)null);
        JLabel deviceLabel = new JLabel("vivo IQOO 11Pro 16GB+512G");
        deviceLabel.setFont(new Font("Microsoft YaHei", 0, 14));
        deviceLabel.setAlignmentX(0.0F);
        deviceCard.add(deviceLabel);
        JPanel pricePanel = new JPanel(new FlowLayout(0));
        pricePanel.setBackground(Color.WHITE);
        pricePanel.setAlignmentX(0.0F);
        JLabel priceLabel = new JLabel("￥1519");
        priceLabel.setFont(new Font("Microsoft YaHei", 1, 24));
        priceLabel.setForeground(new Color(255, 69, 0));
        pricePanel.add(priceLabel);
        deviceCard.add(pricePanel);
        contentPanel.add(deviceCard);
        contentPanel.add(Box.createVerticalStrut(10));
        JPanel formCard = this.createCardPanel("确认上门信息");
        JLabel infoLabel = new JLabel("请核对信息，信息错误将会导致回收师无法按时上门回收");
        infoLabel.setFont(new Font("Microsoft YaHei", 0, 9));
        infoLabel.setForeground(new Color(245, 124, 0));
        infoLabel.setAlignmentX(0.0F);
        formCard.add(infoLabel);
        formCard.add(Box.createVerticalStrut(10));
        String[][] fields = new String[][]{{"姓名", "航宇朋友"}, {"手机号", "191****6666"}, {"所在地区", "辽宁省沈阳市沈北新区"}, {"详细地址", "沈阳航空航天大学南生活区"}};

        for(String[] field : fields) {
            JPanel fieldPanel = new JPanel(new FlowLayout(0, 0, 0));
            fieldPanel.setBackground(Color.WHITE);
            fieldPanel.setAlignmentX(0.0F);
            JLabel label = new JLabel(field[0] + ":");
            label.setFont(new Font("Microsoft YaHei", 0, 11));
            label.setPreferredSize(new Dimension(80, 30));
            JLabel value = new JLabel(field[1]);
            value.setFont(new Font("Microsoft YaHei", 0, 11));
            fieldPanel.add(label);
            fieldPanel.add(value);
            formCard.add(fieldPanel);
        }

        JPanel roomPanel = new JPanel(new FlowLayout(0, 0, 0));
        roomPanel.setBackground(Color.WHITE);
        roomPanel.setAlignmentX(0.0F);
        JLabel roomLabel = new JLabel("门牌号:");
        roomLabel.setFont(new Font("Microsoft YaHei", 0, 11));
        roomLabel.setPreferredSize(new Dimension(80, 30));
        JTextField roomField = new JTextField("例：1号楼101室（非必填）");
        roomField.setFont(new Font("Microsoft YaHei", 0, 11));
        roomField.setForeground(new Color(153, 153, 153));
        roomField.setPreferredSize(new Dimension(250, 30));
        roomPanel.add(roomLabel);
        roomPanel.add(roomField);
        formCard.add(roomPanel);
        contentPanel.add(formCard);
        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, 0));
        buttonPanel.setBackground(new Color(245, 245, 245));
        buttonPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));
        JButton confirmButton = new JButton("确认回收");
        confirmButton.setFont(new Font("Microsoft YaHei", 0, 14));
        confirmButton.setBackground(new Color(255, 69, 0));
        confirmButton.setForeground(Color.WHITE);
        confirmButton.setPreferredSize(new Dimension(350, 50));
        confirmButton.addActionListener((e) -> this.cardLayout.show(this.cardPanel, "success"));
        buttonPanel.add(confirmButton);
        JScrollPane scrollPane = new JScrollPane(contentPanel);
        scrollPane.setBorder(BorderFactory.createEmptyBorder());
        confirmationPanel.add(scrollPane, "Center");
        confirmationPanel.add(buttonPanel, "South");
        return confirmationPanel;
    }

    private JPanel createSuccessPage() {
        JPanel successPanel = new JPanel(new BorderLayout());
        successPanel.setBackground(new Color(245, 245, 245));
        JPanel header = this.createHeader("预约成功", "confirmation");
        successPanel.add(header, "North");
        JPanel contentPanel = new JPanel();
        contentPanel.setLayout(new BoxLayout(contentPanel, 1));
        contentPanel.setBackground(new Color(245, 245, 245));
        contentPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
        JLabel successIcon = new JLabel("✓", 0);
        successIcon.setFont(new Font("Arial", 0, 48));
        successIcon.setForeground(new Color(76, 175, 80));
        successIcon.setAlignmentX(0.5F);
        contentPanel.add(successIcon);
        JLabel successLabel = new JLabel("预约成功", 0);
        successLabel.setFont(new Font("Microsoft YaHei", 1, 24));
        successLabel.setAlignmentX(0.5F);
        contentPanel.add(successLabel);
        contentPanel.add(Box.createVerticalStrut(10));
        JLabel orderLabel = new JLabel("订单号: RE20230614123456", 0);
        orderLabel.setFont(new Font("Microsoft YaHei", 0, 10));
        orderLabel.setForeground(new Color(102, 102, 102));
        orderLabel.setAlignmentX(0.5F);
        contentPanel.add(orderLabel);
        contentPanel.add(Box.createVerticalStrut(20));
        JPanel infoCard = this.createCardPanel((String)null);
        JLabel deliveryLabel = new JLabel("顺丰快递将在04月19号（明天）08:00-09:00上门取件");
        deliveryLabel.setFont(new Font("Microsoft YaHei", 0, 12));
        deliveryLabel.setAlignmentX(0.0F);
        infoCard.add(deliveryLabel);
        JSeparator separator = new JSeparator();
        separator.setAlignmentX(0.0F);
        infoCard.add(Box.createVerticalStrut(10));
        infoCard.add(separator);
        infoCard.add(Box.createVerticalStrut(10));
        JLabel addressTitle = new JLabel("取件地址");
        addressTitle.setFont(new Font("Microsoft YaHei", 1, 12));
        addressTitle.setAlignmentX(0.0F);
        infoCard.add(addressTitle);
        JLabel nameLabel = new JLabel("航宇朋友 191****6666");
        nameLabel.setFont(new Font("Microsoft YaHei", 0, 11));
        nameLabel.setAlignmentX(0.0F);
        infoCard.add(nameLabel);
        JLabel addressLabel = new JLabel("辽宁省沈阳市沈北新区沈阳航空航天大学南生活区");
        addressLabel.setFont(new Font("Microsoft YaHei", 0, 11));
        addressLabel.setAlignmentX(0.0F);
        infoCard.add(addressLabel);
        JButton changeButton = new JButton("更改取件信息");
        changeButton.setFont(new Font("Microsoft YaHei", 0, 10));
        changeButton.setForeground(new Color(33, 150, 243));
        changeButton.setContentAreaFilled(false);
        changeButton.setBorderPainted(false);
        changeButton.setAlignmentX(0.0F);
        infoCard.add(changeButton);
        contentPanel.add(infoCard);
        contentPanel.add(Box.createVerticalStrut(20));
        JPanel processCard = this.createCardPanel("寄送流程");
        String[][] steps = new String[][]{{"1. 寄送平台", "顺丰免费上门取件"}, {"2. 平台验机", "专业质检师全面检测"}, {"3. 出价打钱", "确认后立即打款到账"}};

        for(String[] step : steps) {
            JPanel stepPanel = new JPanel(new FlowLayout(0, 0, 0));
            stepPanel.setBackground(Color.WHITE);
            stepPanel.setAlignmentX(0.0F);
            JLabel stepLabel = new JLabel(step[0]);
            stepLabel.setFont(new Font("Microsoft YaHei", 0, 11));
            stepLabel.setPreferredSize(new Dimension(100, 30));
            JLabel descLabel = new JLabel(step[1]);
            descLabel.setFont(new Font("Microsoft YaHei", 0, 10));
            descLabel.setForeground(new Color(102, 102, 102));
            stepPanel.add(stepLabel);
            stepPanel.add(descLabel);
            processCard.add(stepPanel);
        }

        JButton noticeButton = new JButton("回收前注意事项");
        noticeButton.setFont(new Font("Microsoft YaHei", 0, 10));
        noticeButton.setForeground(new Color(33, 150, 243));
        noticeButton.setContentAreaFilled(false);
        noticeButton.setBorderPainted(false);
        noticeButton.setAlignmentX(0.0F);
        processCard.add(noticeButton);
        contentPanel.add(processCard);
        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, 0));
        buttonPanel.setBackground(new Color(245, 245, 245));
        buttonPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));
        JButton cancelButton = new JButton("取消订单");
        cancelButton.setFont(new Font("Microsoft YaHei", 0, 12));
        cancelButton.setBackground(new Color(245, 245, 245));
        cancelButton.setForeground(new Color(244, 67, 54));
        cancelButton.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY));
        cancelButton.addActionListener((e) -> this.cardLayout.show(this.cardPanel, "home"));
        JButton viewButton = new JButton("查看订单");
        viewButton.setFont(new Font("Microsoft YaHei", 0, 12));
        viewButton.setBackground(new Color(255, 69, 0));
        viewButton.setForeground(Color.WHITE);
        buttonPanel.add(cancelButton);
        buttonPanel.add(Box.createHorizontalStrut(10));
        buttonPanel.add(viewButton);
        JScrollPane scrollPane = new JScrollPane(contentPanel);
        scrollPane.setBorder(BorderFactory.createEmptyBorder());
        successPanel.add(scrollPane, "Center");
        successPanel.add(buttonPanel, "South");
        return successPanel;
    }

    private JPanel createCardPanel(String title) {
        JPanel card = new JPanel();
        card.setLayout(new BoxLayout(card, 1));
        card.setBackground(Color.WHITE);
        card.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));
        card.setAlignmentX(0.0F);
        if (title != null) {
            JLabel titleLabel = new JLabel(title);
            titleLabel.setFont(new Font("Microsoft YaHei", 1, 14));
            titleLabel.setAlignmentX(0.0F);
            card.add(titleLabel);
            card.add(Box.createVerticalStrut(10));
        }

        return card;
    }

    private JPanel createHeader(String title, String backPage) {
        JPanel header = new JPanel(new BorderLayout());
        header.setBackground(Color.WHITE);
        header.setPreferredSize(new Dimension(400, 50));
        JButton backButton = new JButton("←");
        backButton.setFont(new Font("Arial", 0, 16));
        backButton.setContentAreaFilled(false);
        backButton.setBorderPainted(false);
        backButton.addActionListener((e) -> this.cardLayout.show(this.cardPanel, backPage));
        header.add(backButton, "West");
        JLabel titleLabel = new JLabel(title);
        titleLabel.setFont(new Font("Microsoft YaHei", 1, 16));
        header.add(titleLabel, "Center");
        JButton closeButton = new JButton("✕");
        closeButton.setFont(new Font("Arial", 0, 14));
        closeButton.setContentAreaFilled(false);
        closeButton.setBorderPainted(false);
        closeButton.addActionListener((e) -> this.cardLayout.show(this.cardPanel, backPage));
        header.add(closeButton, "East");
        return header;
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            PhoneRecycleApp app = new PhoneRecycleApp();
            app.setVisible(true);
        });
    }
}
